import React, { Component } from 'react'
// import {Button} from 'antd'
import Searchs from '@c/searchHeader'
import Ctable from '@c/table'
// import {router} from "umi"
import {connect} from "dva"

@connect(s => ({
  ...s['index']
}))
class Page extends Component {
  constructor(){
    super()
    this.searchs=[
      {
        type: 'input',
        alias: 'a',
        name: '客户名称'
      },
      {
        type: 'input',
        alias: 'c',
        name: '手机号'
      },
      {
        type: 'time-range',
        alias: ['start', 'end'],
        placeholder: ['最近到店时间'],
      },
      {
        type: 'select',
        alias: 'b',
        name: '最近消费门店'
      },
    ]
    this.columns=[
      {
        title: '客户名称',
        dataIndex: 'a',
        // width: 150
      },
      {
        title: '手机号',
        dataIndex: 'b',
        width: 120
      },
      {
        title: '性别',
        dataIndex: 'c',
        width: 60
      },
      {
        title: '到店消费总额',
        dataIndex: 'd',
        width: 120
      },
      {
        title: '到店消费次数',
        dataIndex: 'e',
        width: 110
      },
      {
        title: '到店消费频次（次/月）',
        dataIndex: 'f',
        width: 180
      },
      {
        title: '客单价',
        dataIndex: 'g',
        width: 80
      },
      {
        title: '最近到店时间',
        dataIndex: 'h',
        width: 120
      },
      {
        title: '最近消费门店',
        dataIndex: 'i',
        width: 140
      },
      {
        title: '操作',
        width: 60,
        align: 'center',
        render: () => {
          return(
            <span>消费详情</span>
          )
        }
      }
    ]
  }
  componentDidMount() {
    // console.log(this.props)
  }
  render() {
    return (
      <div>
        <div>个人会员</div>
        <Searchs option={this.searchs}/>
        <Ctable
          columns={this.columns}
        />
      </div>
    )
  }
}

export default Page

